import time

# To print the execution time of a function fn()
def metric(fn):
    def metricsub(*args, **kwargs):
        print("The function to evaluate execution time is: %s"%fn.__name__)
        start_time = time.time()
        fn(*args, **kwargs)
        end_time = time.time()
        print('Start time: %f' % start_time)
        print("End time: %f" % end_time)
        print('Elapse time: {:.2f}ms'.format((end_time - start_time)*1000))
        return
    return metricsub

@metric
def myFunc(n):
    sum0 = 0
    for i in range(n):
        for j in range(n):
            sum0 += i*j
    return sum0

myFunc(1000)